/*
 * @(#) CommonDao.java 2010-9-2
 *
 * Copyright (c) 2010, Strong Technology Inc. All Rights Reserved.
 * Strong System Inc. CONFIDENTIAL
 */
package cn.strong.gweva.common.integration.dao;

import java.util.List;

import cn.strong.gweva.common.business.entity.PagerEntity;

/**
 * 基类DAO
 * 
 * @author lilanfei
 * @version 1.0
 * @since 2010-9-2
 */
@SuppressWarnings("unchecked")
public interface CommonDao
{
	/**
	 * 查询List
	 * 
	 * @param searchMethod
	 * @param obj
	 * @return
	 * @throws Exception
	 */
	public List searchList(String searchMethod, Object obj) throws Exception;
	
	/**
	 * 查询
	 * 
	 * @param searchMethod
	 * @param obj
	 * @return
	 * @throws Exception
	 */
	public Object searchObj(String searchMethod, Object obj) throws Exception;
	
	/**
	 * 查询个数
	 * 
	 * @param searchMethod
	 * @param obj
	 * @return
	 * @throws Exception
	 */
	public int searchCount(String searchMethod, Object obj) throws Exception;
	
	/**
	 * 修改
	 * 
	 * @param searchMethod
	 * @param obj
	 * @return
	 * @throws Exception
	 */
	public int update(String searchMethod, Object obj) throws Exception;
	
	/**
	 * 批量修改
	 * 
	 * @param searchMethod
	 * @param obj
	 * @return
	 * @throws Exception
	 */
	public int updateBatch(String searchMethod, List obj) throws Exception;
	
	/**
	 * 删除
	 * 
	 * @param searchMethod
	 * @param obj
	 * @return
	 * @throws Exception
	 */
	public int delete(String searchMethod, Object obj) throws Exception;

	/**
	 * 批量删除
	 * 
	 * @param searchMethod
	 * @param obj
	 * @return
	 * @throws Exception
	 */
	public void deleteBatch(String searchMethod, List obj) throws Exception;
	
	/**
	 * 增加
	 * 
	 * @param searchMethod
	 * @param obj
	 * @throws Exception
	 */
	public Object insert(String searchMethod, Object obj) throws Exception;
	
	/**
	 * 批量增加
	 * 
	 * @param searchMethod
	 * @param obj
	 * @throws Exception
	 */
	public void insertBatch(String searchMethod, List obj) throws Exception;
	
	/**
	 * 分页检索
	 * @param entity 
	 * @param searchMethod SQL ID
	 * @param obj 检索Entity
	 * @return
	 * @throws Exception
	 */
	public PagerEntity searchPager(PagerEntity entity,String searchMethod, Object obj) throws Exception;
}

		